<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./../jquery-1.12.4.js"></script>
    <script>
        $.holdReady(true);
        $(document).ready(function () {
            alert(2);
        })
    </script>
</head>

<body>
    <button>恢复ready事件</button>
    <script>
        let btn = document.getElementsByTagName('button')[0];
        btn.onclick = function () {
            $.holdReady(false);
        }
    </script>
</body>

</html>